package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchaseOrderAuditMapper;
import com.ruoyi.system.domain.PurchaseOrderAudit;
import com.ruoyi.system.service.IPurchaseOrderAuditService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购订单审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class PurchaseOrderAuditServiceImpl implements IPurchaseOrderAuditService 
{
    @Autowired
    private PurchaseOrderAuditMapper purchaseOrderAuditMapper;

    /**
     * 查询采购订单审核
     * 
     * @param auditId 采购订单审核主键
     * @return 采购订单审核
     */
    @Override
    public PurchaseOrderAudit selectPurchaseOrderAuditByAuditId(Long auditId)
    {
        return purchaseOrderAuditMapper.selectPurchaseOrderAuditByAuditId(auditId);
    }

    /**
     * 查询采购订单审核列表
     * 
     * @param purchaseOrderAudit 采购订单审核
     * @return 采购订单审核
     */
    @Override
    public List<PurchaseOrderAudit> selectPurchaseOrderAuditList(PurchaseOrderAudit purchaseOrderAudit)
    {
        return purchaseOrderAuditMapper.selectPurchaseOrderAuditList(purchaseOrderAudit);
    }

    /**
     * 新增采购订单审核
     * 
     * @param purchaseOrderAudit 采购订单审核
     * @return 结果
     */
    @Override
    public int insertPurchaseOrderAudit(PurchaseOrderAudit purchaseOrderAudit)
    {
        return purchaseOrderAuditMapper.insertPurchaseOrderAudit(purchaseOrderAudit);
    }

    /**
     * 修改采购订单审核
     * 
     * @param purchaseOrderAudit 采购订单审核
     * @return 结果
     */
    @Override
    public int updatePurchaseOrderAudit(PurchaseOrderAudit purchaseOrderAudit)
    {
        return purchaseOrderAuditMapper.updatePurchaseOrderAudit(purchaseOrderAudit);
    }

    /**
     * 批量删除采购订单审核
     * 
     * @param auditIds 需要删除的采购订单审核主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderAuditByAuditIds(String auditIds)
    {
        return purchaseOrderAuditMapper.deletePurchaseOrderAuditByAuditIds(Convert.toStrArray(auditIds));
    }

    /**
     * 删除采购订单审核信息
     * 
     * @param auditId 采购订单审核主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderAuditByAuditId(Long auditId)
    {
        return purchaseOrderAuditMapper.deletePurchaseOrderAuditByAuditId(auditId);
    }
}
